import { createI18n } from 'vue-i18n'
import { useSettingStore } from '@/store/modules/setting.ts'
import en from './langs/en/index.ts' //导入英文语言包
import cn from './langs/cn/index.ts' //导入英文语言包

const { layoutConfig } = useSettingStore()

const localeData = {
  legacy: false, // you must set `false`, to use Composition API
  locale: layoutConfig.Language,
  messages: {
    en: en,
    cn: cn,
  },
}
const i18n = createI18n(localeData)

export default i18n
